<%@page contentType="text/html" language="java" import="com.compuvest.web.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<%@ taglib uri="/WEB-INF/tld/head.tld" prefix="head" %>
<%@ taglib uri="/WEB-INF/tld/bottom.tld" prefix="bottom" %>

<jsp:useBean id="sb" class="MySQL" scope="application"/>
<jsp:useBean id="advertArray" class="AdvertArray" scope="application"/>
<jsp:useBean id="basket" class="Basket" scope="session"/>

<%!
    public static String rAdvert = null;
    public static java.util.Map<Integer,java.util.ArrayList<Item>> advertItemsPageMap = null;
%>
<html>
<head>
<title>Welcome to Compuvest</title>
<link rel="stylesheet" type="text/css" href="../incl/cv.css"/>
<link rel="stylesheet" type="text/css" href="../incl/cv_new.css"/>

<script type="text/javascript" src="../incl/blure.js"></script>
</head>

<body style="margin:0 0;padding:0 0;background-color:#eaf2ea;" onload="menu();">

<table width='100%' height='100%' border=0>
 <colgroup><col width=160><col width='0*'><col width=160></colgroup>

<tr valign=top height=84>
 <td colspan=3>

<head:show />

 </td>
</tr>

 <tr valign=top align=center>
  <td>
<%= advertArray.getMainMenu(0, 0, request.isRequestedSessionIdFromCookie(), session, response) %>
  </td>

  <td>
<br/>
<%
/*
   try {
	ContextEnveroment enveroment = new ContextEnveroment();
	long startEvent = 0L;

	out.println("<hr width='90%'/><h3>Update category and subcategory</h3>");
        // Category and subcategory in Map
	startEvent = System.currentTimeMillis();
	int size = advertArray.selectCategoryAll();
	out.println("context.category ... " + size + " Done<br/>");
	out.println("context.subcategory ... " + size + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");

// advert first page in Map
	out.println("<hr width='90%'/><h3>Advert First Page</h3>");
	startEvent = System.currentTimeMillis();
	size = advertArray.selectItemsFirstPage();
	out.println("Regresh ItemsFirstPage ... " + size + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");
//

// advert category page in Map
	out.println("<hr width='90%'/><h3>Advert Category Page</h3>");
	startEvent = System.currentTimeMillis();
	size = advertArray.selectItemsCategoryPage();
	out.println("context.advertCategoryPageMap ... " + size + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");

// advert subcategory page in Map
	out.println("<hr width='90%'/><h3>Advert SubCategory Page</h3>");
	startEvent = System.currentTimeMillis();
	size = advertArray.selectItemsSubCategoryPage();
	out.println("context.advertSubCategoryPageMap ... " + size + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");
//

// advert items page in Map
//	out.println("<hr width='90%'/><h3>Advert Items Page</h3>");
//	startEvent = System.currentTimeMillis();
//	advertItemsPageMap = enveroment.getAdvertItemsPage();

	synchronized(application) {
	    application.setAttribute("context.advertItemsPageMap", advertItemsPageMap);
	}
	out.println("context.advertItemsPageMap ... " + advertItemsPageMap.size() + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");
//

	out.println("<hr width='90%'/><h3>Menu</h3>");
	startEvent = System.currentTimeMillis();
	size = advertArray.selectMenuString();
	out.println("context.menu ... " + size + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");

//
	out.println("<hr width='90%'/><h3>Brands Page</h3>");
	startEvent = System.currentTimeMillis();
	size = advertArray.selectBrandPageString();
	out.println("context.brandPage ... " + size + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");

	out.println("<hr width='90%'/><h3>Cantry List</h3>");
	startEvent = System.currentTimeMillis();
	size = advertArray.selectCountryString();
	out.println("country ... " + size + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");

	out.println("<hr width='90%'/><h3>State List</h3>");
	startEvent = System.currentTimeMillis();
	size = advertArray.selectStateString();
	out.println("state ... " + size + " Done " + (System.currentTimeMillis() - startEvent) + "ms</br>");

	out.println("<hr width='90%'/>");
    }
    catch(Exception se) {
        out.println("init error:\n" + se + "<br/>");
    }
*/
%>
  </td>

  <td>&nbsp;</td>
 </tr>

 <tr height=35>
 <td colspan=3>

<bottom:show />

 </td>
</tr>

</table>

</body>
</html>
